#include "control.h"

Control::Control(QQuickWindow *win, int size, QObject *par) :
    QObject(par), m_win(win), m_size(size) {
    m_win->setWidth(m_size);
    m_win->setHeight(m_size);

}

void Control::startAnimation(int x, int y) {
    m_win->setPosition(x-m_size/2, y-m_size/2);
    QMetaObject::invokeMethod(m_win, "startAnimation", Qt::QueuedConnection);

}
